AI-2442: add read-only access control for guest and read-only roles#397
Conversation
- Filter tools list to read-only tools only for guest/readonly roles - Block write tool calls for guest/readonly roles with a clear error message - Swallow 403 errors in tool event trigger (expected for restricted roles) - Extract is_read_only_tool() to utils.py, removing duplicate from authorization.py - Bump version to 1.44.8 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matovidlo
left a comment
There was a problem hiding this comment.
It looks alright, the issue is that guest can use all tools except flows one, read only users cannot submit storage events. Therefore I am missing these 2 things. I would do guest role as all tools - excluding scheduler ones and for RO we need to somehow not report to AI/User of MCP when having RO role 403 forbidden when doing storage event or even better to not call it when such user is using the MCP
Ok, this is now fixed in 109fbce. The
The |
requests.JSONDecodeError is identical to json.JSONDecodeError (requests re-exports it), making the handler redundant. Removing it eliminates the undeclared dependency on the requests library, which is no longer reliably available as a transitive dep (jsonschema-path 0.4.x made it optional). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
Linear: AI-2442
Change Type
Summary
Transplants the role-based access control fix from upstream PR #381:
guestandreadonlyrolesis_read_only_tool()helper tomcp.py, replacing the duplicate_is_read_only_tool()inauthorization.pyTesting
Streamable-HTTPtransports)Optional testing
canary-orionMCP (SSEandStreamable-HTTP)canary-orioncanary-orionChecklist